home *** CD-ROM | disk | FTP | other *** search
- unit Uprintpr;
-
- interface
-
- { This example shows the different on using Proportional printing or not }
- uses
- WinProcs,WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ExtCtrls, TeeProcs, TeEngine, Chart, DBChart, StdCtrls, Series;
-
- type
- TForm1 = class(TForm)
- Button1: TButton;
- Button2: TButton;
- Button3: TButton;
- Label1: TLabel;
- Label2: TLabel;
- Chart1: TChart;
- Series1: TBarSeries;
- procedure Button1Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Button3Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
- uses TeePrevi;
-
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- Chart1.PrintProportional:=True;
- ChartPreview(Self,Chart1);
- end;
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- { Warning to 32-bit users }
- Series1.FillSampleValues(8);
- {$IFNDEF WIN32}
- ShowMessage('Warning: Metafiles and printing work much better'+#13+
- 'in Windows 32-bit (Windows 95 or NT)');
- {$ELSE}
- ShowMessage('Warning: This example is intended for Delphi 1.0 16-bit'+#13+
- 'or for problems with 32-bit printer drivers'+#13+#13+
- 'It might work fine on your system configuration.');
- {$ENDIF}
- end;
-
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- Chart1.PrintProportional:=False;
- Chart1.PrintMargins:=Rect(15,15,15,15); { default margins }
- ChartPreview(Self,Chart1);
- end;
-
- procedure TForm1.Button3Click(Sender: TObject);
- begin
- Close;
- end;
-
- end.
-